package xyz.thoughtset.viewer.modules.ds.core.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import xyz.thoughtset.viewer.common.connector.entity.bo.Linker;
import xyz.thoughtset.viewer.common.core.entity.BaseMeta;
import xyz.thoughtset.viewer.common.crud.core.annotation.ApiCRUDPower;

@TableName
@Data @AllArgsConstructor @NoArgsConstructor
@ApiCRUDPower(insert = false,save = true,update = false,list = true)
public class LinkerConfig extends BaseMeta {
    protected String driverClassName;
    protected String jarFilePath;
    protected String linkerType = "jdbc";
    protected String otherSettings;
    protected Boolean reactive = false;

    public Linker buildLinker(){
        return new Linker(this.id,this.driverClassName,this.jarFilePath,null,false,this.reactive,this.linkerType);
    }


}
